Skip to main content
Version: 1.0.2

Decline Transaction

The Decline Transaction API displays the status that the transaction chosen for approval is declined successfully.

Method: POST

{{URL}}/jsonrpc

Headers

NameValue
Content-Typeapplication/json

Example

Payload Parameters
ParameterDescription

id

Mandatory

String

Unique ID for each request

jsonrpc

String

JSON RPC VERSION - should be "2.0"

method

Mandatory

String

Method Name - should be "VisaService.DeclineTransaction "

params

Mandatory

Object

api

Mandatory

Object

credential

Mandatory

String

API credential provided by NetXD

signature

Mandatory

String

Signature of the digitally signed payload

payload

Mandatory

Object

id

Mandatory

String

Transaction Id

notes

Optional

String

Reason for rejection or any other notes, if required


curl --location --globoff '{{URL}}/jsonrpc' \
--header 'Content-Type: application/json' \
--data '{"id":"1","jsonrpc":"2.0","method":"VisaService.DeclineTransaction","params":{"api":{"credential":"Basic cy5wYXJhbWVzd2FyYW4rMkBiYW5rY2J3Lm9yZzpUZXN0QDEyMzQ=","signature":"MEQCIBSawbPLePljNPwR1UXxhRaru0el/jI4raAPKZiwQmEmAiAEj5q/YIbB/p+jrK8aRbkp/7PoR6FhMLyMoidAUa82bw=="},"payload":{"id":"65c0b733c5ff5b64aa294569","notes":"rejected"}}}'

Body


{
"id": "1",
"jsonrpc": "2.0",
"method": "VisaService.DeclineTransaction",
"params": {
"api": {
"credential": "Basic cy5wYXJhbWVzd2FyYW4rMkBiYW5rY2J3Lm9yZzpUZXN0QDEyMzQ=",
"signature": "MEQCIBSawbPLePljNPwR1UXxhRaru0el/jI4raAPKZiwQmEmAiAEj5q/YIbB/p+jrK8aRbkp/7PoR6FhMLyMoidAUa82bw=="
},
"payload": {
"id": "65c0b733c5ff5b64aa294569",
"notes": "rejected"
}
}
}

Response: 201

Response Parameters
ParameterDescription

jsonrpc

String

JSON RPC VERSION - should be "2.0"

result

Object

message

String

Status of Transaction decline

id

String

Unique ID for each response


{
"jsonrpc": "2.0",
"result": {
"message": "Transaction declined successfully"
},
"id": "1"
}